Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

135
Vistas
Javascript with blockchain development, address.trans returns [] when theres no transactions pend

address.trans returns [] when theres no transactions pend if(txs === []){ returns a transaction still

Any solutions? Basically registering a "depo" when I never depo'd to the generated wallet.enter image description here

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

This should be happening because an array is an object. And two objects even with the same value are not equal in JS because they have different reference.

You can see that below:

let trans = [];
console.log(trans === []);
console.log([] === []);
console.log(trans.length === 0);

Array.prototype.length can be one way to check it:

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda